import Vue from 'vue'
// 1.引入
import Vuex from 'vuex'
// 外部文件引入模块
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import permission from './modules/permission'
import user from './modules/user'
// 2.注册
Vue.use(Vuex)
// 4.实例化
const store = new Vuex.Store({
  // 3.定义规则
  modules: {
    app,
    settings,
    user,
    permission
  },
  getters
})

export default store
